import { defineStore } from 'pinia'

export const useUserStore = defineStore('user', {
  state() {
    return {
      access: ''
    }
  },
  actions: {
    setUser(access) {
      this.access = access
    },
    logout() {
      this.access= ''
    },
    getUser() {
      return {
        access: this.acces,
    
      }
    }
  },
  persist: true  // 启用持久化（默认 localStorage）
})

